//
// Created by Administrator on 2020/9/27.
//

#ifndef CSP_INCLUDE_UTILS_MYVSPRINTF_H_
#define CSP_INCLUDE_UTILS_MYVSPRINTF_H_

#include "../../include/utils/commDef.h"

#ifdef __cplusplus
extern "C"
{
#endif

typedef char *my_va_list;

#define my_va_arg(ap, T)        (*(T *)((((ap) += sizeof(uint64_t)) - sizeof(uint64_t))))
#define my_va_end(ap)           (ap = (my_va_list) NULL)
#define my_va_start(ap, V)      (void) ((ap) = ((char *)V))

int rpl_vsnprintf(char *str, size_t size, const char *format, my_va_list args);

#ifdef __cplusplus
}
#endif

#endif //CSP_INCLUDE_UTILS_MYVSPRINTF_H_
